Following tutorials show how to use AOP Annotations to log events.
AOP stands for Aspect Orientated Programming.
AOP is a way for adding behavior to existing code without modifying that code.
By using Annotations business logic code isn't polluted with logging code.
Examples
Signature method = joinPoint.getSignature(); //String com.ivoronline...MyController.hello()
String classPathName = method.getDeclaringTypeName(); //com.ivoronline...controllers.MyController
String methodName = method.getName(); //hello
Class methodClass = method.getDeclaringType(); //class com.ivoronline...controllers.MyController
String classPathName2 = methodClass.getName(); //com.ivoronline...controllers.MyController
String packageName = methodClass.getPackageName(); //com.ivoronline...controllers
String className = methodClass.getSimpleName(); //MyController